package 作业1024.作业01;

public class Yuan {
    private double banjing;
    private static double yuanzhouliu=3.14;

    public Yuan() {
    }

    public Yuan(double banjing) {
        this.banjing = banjing;
    }

    public double getBanjing() {
        return banjing;
    }

    public void setBanjing(double banjing) {
        this.banjing = banjing;
    }

    public static double getYuanzhouliu() {
        return yuanzhouliu;
    }

    public static void setYuanzhouliu(double yuanzhouliu) {
        Yuan.yuanzhouliu = yuanzhouliu;
    }
    public double zhouchang(){
        double zc;
        zc=2*banjing*yuanzhouliu;
        System.out.println("半径为"+banjing+"的周长为"+zc);
        return zc;
    }
    public double mianji(){
        double mj=banjing*banjing*yuanzhouliu;
        System.out.println("半径为"+banjing+"的面积为"+mj);
        return mj;
    }
}
